{include file="admin/header.tpl" title="header" }

 <div id="content">
 {php} echo display_msg(); {/php}
      <div class="lstable " style="border:none;">
      
      
      	{if $password_reset eq '1'}
          <div class="success"> Your password is updated successfully. </div>
          <p> Please <a class="forget_back_link" href="{$baseurl}/admin/">click here</a> to login with new password </p>
        {/if}
        
      
        {if $valid_code eq '1'}
        	
             <div class="logintable " align="center">
        <form action="{$baseurl}/admin/reset_password.php" name="rest_password" id="rest_password" method="post" onsubmit="return validate();">
        <input type="hidden" name="action" value="reset_password"  />
        <input type="hidden" name="reset_code" value="{$post.reset_code}"  />
          <table width="100%"  border="0" cellpadding="0" cellspacing="0">
            <tr>
              <th  align="left" valign="middle"><span style="float:left"><strong>Reset New Password</strong></span> <!--in to your account or <a href="#">sign up</a> to create one.--></th>
            </tr>
            <tr>
              <td align="center" valign="middle"><label>New Password:</label><input name="password" id="password" type="password" class="input"  /></td>
            </tr>
            
            <tr>
              <td align="center" valign="middle"><label>Confirm Password:</label><input name="confirm_password" id="confirm_password" type="password" class="input" /></td>
            </tr>
            
            <tr>
              <td align="left" valign="middle"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                  <tr>
                    <td align="left" valign="middle"><input name="submit" class="btn" type="submit" value="Submit" /></td>
                    <td align="left" valign="middle"><!--<input type="checkbox" name="checkbox" id="checkbox" />
                      Remember my login on this computer--></td>
                  </tr>
                </table></td>
            </tr>
            <tr>
              <td align="left" valign="middle" class="l_links"></td>
            </tr>
            <tr>
              <td align="left" valign="middle" class="l_links"></td>
            </tr>
          </table>
          </form>
          </div>
        {/if}
        {if $valid_code eq '2'}
       
       	<div class="error"> Invalid link or link is expired. Password can not be reset.</div>
       
          {/if}
        
      </div>
    </div>

<script>
{literal}

$('#password').focus();

function validate()
{
	
	con_password = $('#confirm_password').val();
	password = $('#password').val();

	if(password=='')
	{
		alert('Please enter password.');
		$('#password').focus();
		 return false;
	}	
	
	if(password.length < 6)
	{
		alert('Your password must be longer than 6 characters.');
		$('#password').focus();
		return false;
	 }
	 
	 if(con_password=='')
	 {
			 alert('Please enter confirm password.');
			 $('#confirm_password').focus();
			 return false;
	 }
	 
	 if(password != con_password)
	 {
		 alert('Password and confirm password should be same');
		 return false;
	 }
		
	return true;
		
}

{/literal}
</script>
         
           
{include file="admin/footer.tpl" title="footer"}